home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / QuickTime / QuickTime VR Tools 1.0b2 / QTVR Beta-Level Tools Source / Make QTVR Object 1.0b2 / QTVRObjectAuthoring.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-29  |  3.0 KB  |  96 lines  |  [TEXT/CWIE]

  1. #ifndef __QTVROBJECTAUTHORING__
  2. #define __QTVROBJECTAUTHORING__
  3.  
  4. #ifndef __MOVIES__
  5. #include <Movies.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. // Creator types
  13. #define kQTVRPlayerCreatorType        'vrod'
  14. #define kMoviePlayerCreatorType        'TVOD'
  15. #define kControllerID                1
  16.  
  17. // QTVR Object types
  18. enum {
  19.     kBadObjectType            = 0,
  20.     kStandardObject            = 1,    // "Object"          in Add Navigable Data dialog
  21.     kOldNavigableMovieScene    = 2,    // "Scene"           in Add Navigable Data dialog
  22.     kObjectInScene            = 3        // "Object In Scene" in Add Navigable Data dialog
  23. };
  24.  
  25. // File format for version 1.0.
  26. #pragma options align=mac68k
  27. typedef struct {
  28.     short            versionNumber;        // Always 1
  29.     short            numberOfColumns;    // Number of columns in movie
  30.     short            numberOfRows;        // Number rows in movie
  31.     short            reserved1;            // Zero
  32.     short            loopSize;            // Number of frames shot at each position
  33.     short            frameDuration;        // The duration of each frame
  34.     short            movieType;            // kStandardObject, kObjectInScene, or kOldNavigableMovieScene
  35.     short            loopTicks;            // Number of ticks before next frame of loop is displayed
  36.     Fixed            fieldOfView;        // 180.0 for kStandardObject or kObjectInScene, actual degrees for kOldNavigableMovieScene.
  37.     Fixed            startHPan;            // Start   horizontal pan angle in degrees
  38.     Fixed            endHPan;            // End     horizontal pan angle in degrees
  39.     Fixed            endVPan;            // End     vertical   pan angle in degrees
  40.     Fixed            startVPan;            // Start   vertical   pan angle in degrees
  41.     Fixed            initialHPan;        // Initial horizontal pan angle in degrees (poster view)
  42.     Fixed            initialVPan;        // Initial vertical   pan angle in degrees (poster view)
  43.     long            reserved2;            // Zero
  44. } QTVRObjectFileFormat1x0Record, *QTVRObjectFileFormat1x0Ptr;
  45. #pragma options align=reset
  46.  
  47. pascal OSErr SetQTVRObjectFileFormat1x0 (
  48.                         Movie        movie,
  49.                         short        movieResFref,
  50.                         short        movieResID,
  51.                         FSSpec        movieSFFile,
  52.                         TimeValue    posterViewTime,
  53.                         const QTVRObjectFileFormat1x0Ptr    fileFormatPtr);
  54.                         
  55. pascal OSErr GetQTVRObjectFileFormat1x0 (
  56.                         Movie        movie,
  57.                         QTVRObjectFileFormat1x0Ptr    fileFormatPtr);
  58.                         
  59. pascal OSErr DeleteQTVRObjectFileFormat1x0 (
  60.                         Movie        movie,
  61.                         short        movieResFref,
  62.                         short        movieResID,
  63.                         FSSpec        movieSFFile);
  64.  
  65. void ConvertTimeToPanUtil (TimeValue time, 
  66.                             TimeValue frameDuration,
  67.                             short numColumns,
  68.                             short numRows,
  69.                             short loopSize,
  70.                             Fixed startHPan,
  71.                             Fixed endHPan,
  72.                             Fixed startVPan,
  73.                             Fixed endVPan,
  74.                             Fixed *hPan,
  75.                             Fixed *vPan);
  76.                             
  77. OSErr StuffQTVRObjectFileFormat1x0 (short        movieType,
  78.                                     TimeValue    frameDuration,
  79.                                     short        numberOfColumns,
  80.                                     short        numberOfRows,
  81.                                     short        loopSize,
  82.                                     short        loopTicks,
  83.                                     Fixed        startHPan,
  84.                                     Fixed        endHPan,
  85.                                     Fixed        startVPan,
  86.                                     Fixed        endVPan,
  87.                                     Fixed        fieldOfView,
  88.                                     Fixed        initialHPan,
  89.                                     Fixed        initialVPan,
  90.                                     QTVRObjectFileFormat1x0Ptr    fileFormatPtr);
  91.  
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95.  
  96. #endif//__QTVROBJECTAUTHORING__